package com.aspose.cells;

class zsi {
   private static final com.aspose.cells.b.c.a.za a = new com.aspose.cells.b.c.a.za(new String[]{"km", "m", "mi", "Nmi", "in", "ft", "yd", "ang", "Pica", "F", "C", "K", "yr", "day", "hr", "mn", "sec", "tsp", "tbs", "oz", "cup", "pt", "us_pt", "uk_pt", "qt", "gal", "lt", "l"});

   static Object a(double var0, double var2, String var4) {
      return !var4.equals("i") && !var4.equals("j") ? zst.i : com.aspose.cells.b.a.zr.a(new zme(var0, var2, var4));
   }

   static double a(String var0) {
      switch(a.a(var0)) {
      case 0:
         return 39370.07874015748D;
      case 1:
         return 39.37007874015748D;
      case 2:
         return 63360.0D;
      case 3:
         return 72913.38583D;
      case 4:
         return 1.0D;
      case 5:
         return 12.0D;
      case 6:
         return 36.0D;
      case 7:
         return 3.93701E-9D;
      case 8:
         return 0.013888889D;
      default:
         return 1.0D;
      }
   }

   static Object a(double var0, String var2, String var3) {
      switch(a.a(var2)) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      case 8:
         switch(a.a(var3)) {
         case 0:
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
         case 6:
         case 7:
         case 8:
            return var0 * (a(var2) / a(var3));
         default:
            return zst.c;
         }
      case 9:
      case 10:
      case 11:
         switch(a.a(var3)) {
         case 9:
         case 10:
         case 11:
            return b(a(var0, var2), var3);
         default:
            return zst.c;
         }
      case 12:
      case 13:
      case 14:
      case 15:
      case 16:
         switch(a.a(var3)) {
         case 12:
         case 13:
         case 14:
         case 15:
         case 16:
            return var0 * c(var2) / c(var3);
         default:
            return zst.c;
         }
      case 17:
      case 18:
      case 19:
      case 20:
      case 21:
      case 22:
      case 23:
      case 24:
      case 25:
      case 26:
      case 27:
         switch(a.a(var3)) {
         case 17:
         case 18:
         case 19:
         case 20:
         case 21:
         case 22:
         case 23:
         case 24:
         case 25:
         case 26:
         case 27:
            return var0 * b(var2) / b(var3);
         default:
            return zst.c;
         }
      default:
         return var0;
      }
   }

   static double b(String var0) {
      switch(a.a(var0)) {
      case 17:
         return 4.928924902900179D;
      case 18:
         return 14.78677470870054D;
      case 19:
         return 29.57354941740108D;
      case 20:
         return 236.58839533920863D;
      case 21:
      case 22:
         return 473.17567119968953D;
      case 23:
         return 568.2463916354131D;
      case 24:
         return 946.3513423993791D;
      case 25:
         return 3785.412534257983D;
      case 26:
      case 27:
         return 1000.0D;
      default:
         return 1.0D;
      }
   }

   static double c(String var0) {
      switch(a.a(var0)) {
      case 12:
         return 8766.0D;
      case 13:
         return 24.0D;
      case 14:
         return 1.0D;
      case 15:
         return 0.016666666666666666D;
      case 16:
         return 2.777777777777778E-4D;
      default:
         return 1.0D;
      }
   }

   static double a(double var0, String var2) {
      switch(a.a(var2)) {
      case 9:
         return (var0 - 32.0D) * 5.0D / 9.0D;
      case 10:
         return var0;
      case 11:
         return var0 - 273.15D;
      default:
         return var0;
      }
   }

   static double b(double var0, String var2) {
      switch(a.a(var2)) {
      case 9:
         return var0 * 9.0D / 5.0D + 32.0D;
      case 10:
         return var0;
      case 11:
         return var0 + 273.15D;
      default:
         return var0;
      }
   }

   static Object a(String[] var0) {
      zme var1 = new zme();

      for(int var2 = 0; var2 < var0.length; ++var2) {
         zme var3 = new zme(var0[var2]);
         var1 = var1.a(var3);
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   static Object a(String var0, String var1) {
      zme var2 = new zme(var0);
      zme var3 = new zme(var1);
      zme var4 = var2.b(var3);
      return com.aspose.cells.b.a.zr.a(var4);
   }

   static Object d(String var0) {
      zme var1 = new zme(var0);
      return var1.a();
   }

   static Object e(String var0) {
      zme var1 = new zme(var0);
      return var1.b();
   }

   static Object b(String[] var0) {
      zme var1 = new zme(var0[0]);

      for(int var2 = 1; var2 < var0.length; ++var2) {
         zme var3 = new zme(var0[var2]);
         var1 = var1.c(var3);
      }

      return com.aspose.cells.b.a.zr.a(var1);
   }

   static Object b(String var0, String var1) {
      zme var2 = new zme(var0);
      zme var3 = new zme(var1);
      zme var4 = var2.d(var3);
      return com.aspose.cells.b.a.zr.a(var4);
   }

   static Object f(String var0) {
      zme var1 = new zme(var0);
      return var1.c();
   }

   static Object g(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.d());
   }

   static Object h(String var0) {
      zme var1 = new zme(var0);
      zme var2 = new zme(com.aspose.cells.b.a.zq.a(2.718281828459045D, 2.0D), 0.0D);
      zme var3 = var1.d().c(var2);
      return com.aspose.cells.b.a.zr.a(var3);
   }

   static Object i(String var0) {
      zme var1 = new zme(var0);
      zme var2 = new zme(Math.log10(2.718281828459045D), 0.0D);
      zme var3 = var1.d().c(var2);
      return com.aspose.cells.b.a.zr.a(var3);
   }

   static Object j(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.e());
   }

   static Object k(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.f());
   }

   static Object l(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.g());
   }

   static Object a(String var0, double var1) {
      zme var3 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var3.a(var1));
   }

   static Object m(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.h());
   }

   static Object n(String var0) {
      zme var1 = new zme(var0);
      return var1.i();
   }

   static Object o(String var0) {
      zme var1 = new zme(var0);
      return com.aspose.cells.b.a.zr.a(var1.j());
   }

   static Object a(double var0, double var2) {
      return var0 == var2 ? 1 : 0;
   }

   static Object a(double var0) {
      return a(var0, 0.0D);
   }

   static Object b(double var0, double var2) {
      return var0 >= var2 ? 1 : 0;
   }

   static Object b(double var0) {
      return b(var0, 0.0D);
   }

   static Object a(long var0) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 2, 10);
   }

   static Object a(long var0, int var2) {
      return Long.toString(var0).length() <= 10 && var2 >= 0 ? a(Long.toString(var0), 2, 8, var2) : zst.f;
   }

   static Object b(long var0) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 2, 8);
   }

   static Object b(long var0, int var2) {
      return Long.toString(var0).length() <= 10 && var2 >= 0 ? a(Long.toString(var0), 2, 16, var2) : zst.f;
   }

   static Object c(long var0) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 2, 16);
   }

   static Object d(long var0) {
      return var0 <= 511L && var0 >= -512L ? a(Long.toString(var0), 10, 2) : zst.f;
   }

   static Object c(long var0, int var2) {
      return var0 <= 511L && var0 >= -512L && var2 >= 0 ? a(Long.toString(var0), 10, 2, var2) : zst.f;
   }

   static Object e(long var0) {
      return var0 <= 535870911L && var0 >= -536870912L ? a(Long.toString(var0), 10, 8) : zst.f;
   }

   static Object d(long var0, int var2) {
      return var0 <= 535870911L && var0 >= -536870912L && var2 >= 0 ? a(Long.toString(var0), 10, 8, var2) : zst.f;
   }

   static Object f(long var0) {
      return var0 <= 549755813887L && var0 >= -549755813888L ? a(Long.toString(var0), 10, 16) : zst.f;
   }

   static Object e(long var0, int var2) {
      return var0 <= 549755813887L && var0 >= -549755813888L && var2 >= 0 ? a(Long.toString(var0), 10, 16, var2) : zst.f;
   }

   static Object p(String var0) {
      if (var0.length() > 10) {
         return zst.f;
      } else if (var0.length() == 3 && var0.toUpperCase().compareTo("1FF") > 0) {
         return zst.f;
      } else if (var0.length() > 3 && var0.length() < 10) {
         return zst.f;
      } else {
         return var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F' && var0.toUpperCase().compareTo("FFFFFFFE00") < 0 ? zst.f : a(var0, 16, 2);
      }
   }

   static Object a(String var0, int var1) {
      if (var0.length() <= 10 && var1 >= 0) {
         if (var0.length() == 3 && var0.toUpperCase().compareTo("1FF") > 0) {
            return zst.f;
         } else if (var0.length() > 3 && var0.length() < 10) {
            return zst.f;
         } else {
            return var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F' && var0.toUpperCase().compareTo("FFFFFFFE00") < 0 ? zst.f : a(var0, 16, 2, var1);
         }
      } else {
         return zst.f;
      }
   }

   static Object q(String var0) {
      return var0.length() > 10 ? zst.f : a(var0, 16, 10);
   }

   static Object r(String var0) {
      if (var0.length() > 10) {
         return zst.f;
      } else if (var0.length() == 8 && var0.toUpperCase().compareTo("1FFFFFFF") > 0) {
         return zst.f;
      } else if (var0.length() > 8 && var0.length() < 10) {
         return zst.f;
      } else {
         return var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F' && var0.toUpperCase().compareTo("FFE0000000") < 0 ? zst.f : a(var0, 16, 8);
      }
   }

   static Object b(String var0, int var1) {
      if (var0.length() <= 10 && var1 >= 0) {
         if (var0.length() == 8 && var0.toUpperCase().compareTo("1FFFFFFF") > 0) {
            return zst.f;
         } else if (var0.length() > 8 && var0.length() < 10) {
            return zst.f;
         } else {
            return var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F' && var0.toUpperCase().compareTo("FFE0000000") < 0 ? zst.f : a(var0, 16, 8, var1);
         }
      } else {
         return zst.f;
      }
   }

   static Object g(long var0) {
      if (Long.toString(var0).length() > 10) {
         return zst.f;
      } else if (Long.toString(var0).length() < 10 && var0 > 777L) {
         return zst.f;
      } else {
         return Long.toString(var0).length() == 10 && var0 > 7777777000L ? zst.f : a(Long.toString(var0), 8, 2);
      }
   }

   static Object f(long var0, int var2) {
      if (Long.toString(var0).length() <= 10 && var2 >= 0) {
         if (Long.toString(var0).length() < 10 && var0 > 777L) {
            return zst.f;
         } else {
            return Long.toString(var0).length() == 10 && var0 > 7777777000L ? zst.f : a(Long.toString(var0), 8, 2, var2);
         }
      } else {
         return zst.f;
      }
   }

   static Object h(long var0) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 8, 10);
   }

   static Object i(long var0) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 8, 16);
   }

   static Object g(long var0, int var2) {
      return Long.toString(var0).length() > 10 ? zst.f : a(Long.toString(var0), 8, 16, var2);
   }

   static Object c(double var0, double var2) {
      if (var0 >= 0.0D && var2 >= 0.0D) {
         double var4 = e(var2) - e(var0);
         return var4;
      } else {
         return zst.f;
      }
   }

   static Object c(double var0) {
      if (var0 < 0.0D) {
         return zst.f;
      } else {
         double var2 = e(var0);
         return var2;
      }
   }

   static Object d(double var0) {
      if (var0 < 0.0D) {
         return zst.f;
      } else {
         double var2 = 1.0D - e(var0);
         return var2;
      }
   }

   static double e(double var0) {
      double[] var2 = new double[]{5.958930743E-11D, -1.13739022964E-9D, 1.466005199839E-8D, -1.635035446196E-7D, 1.6461004480962E-6D, -1.492559551950604E-5D, 1.2055331122299264E-4D, -8.548326981129666E-4D, 0.005223977624823223D, -0.026866170645077334D, 0.11283791670954882D, -0.3761263890318375D, 1.1283791670955126D, 2.372510631E-11D, -4.5493253732E-10D, 5.90362766598E-9D, -6.642090827576E-8D, 6.7595634268133E-7D, -6.21188515924E-6D, 5.10388300970969E-5D, -3.7015410692956176E-4D, 0.00233307631218881D, -0.012549884771821921D, 0.05657061146827042D, -0.21379664776456006D, 0.8427007929497149D, 9.49905026E-12D, -1.8310229805E-10D, 2.39463074E-9D, -2.721444369609E-8D, 2.8045522331686E-7D, -2.61830022482897E-6D, 2.195455056768781E-5D, -1.6358986921372656E-4D, 0.0010705215356411031D, -0.006082847181135901D, 0.029869784652462584D, -0.13055593046562267D, 0.674933236039655D, 3.82722073E-12D, -7.421598602E-11D, 9.793057408E-10D, -1.126008898854E-8D, 1.1775134830784E-7D, -1.1199275838265E-6D, 9.62023443095201E-6D, -7.404402135070773E-5D, 5.068999365414488E-4D, -0.003075530514392729D, 0.016689778925531657D, -0.08548534594781312D, 0.5690907664239364D, 1.55296588E-12D, -3.032205868E-11D, 4.0424830707E-10D, -4.71135111493E-9D, 5.011915876293E-8D, -4.8722516178974E-7D, 4.30683284629395E-6D, -3.445026145385764E-5D, 2.4879276133931664E-4D, -0.0016294094174807928D, 0.009887863739323505D, -0.05962426839442304D, 0.49766113250947636D};
      double[] var3 = new double[]{-2.9734388465E-10D, 2.69776334046E-9D, -6.40788827665E-9D, -1.6678201321E-8D, -2.1854388148686E-7D, 2.66246030457984E-6D, 1.612722157047886E-5D, -2.5616361025506627E-4D, 1.5380842432375364E-4D, 0.00815533022524928D, -0.014022836638963193D, -0.19746892495383023D, 0.7151172032884284D, -1.951073787E-11D, -3.2302692214E-10D, 5.22461866919E-9D, 3.42940918551E-9D, -3.5772874310272E-7D, 1.9999935792654E-7D, 2.687044575042908E-5D, -1.1843240273775776E-4D, -8.099172895603227E-4D, 0.006610629705022412D, 0.009095309223548273D, -0.20160072778491014D, 0.5116969671872764D, 3.147682272E-11D, -4.8465972408E-10D, 6.3675740242E-10D, 3.377623323271E-8D, -1.5451139637086E-7D, -2.03340624738438E-6D, 1.947204525295057E-5D, 2.854147231653228E-5D, -0.0010156506315220028D, 0.0027118700352009566D, 0.023280950354228107D, -0.16725021123116876D, 0.32490054966649434D, 2.31936337E-11D, -6.303206648E-11D, -2.64888267434E-9D, 2.050708040581E-8D, 1.1371857327578E-7D, -2.11211337219663E-6D, 3.68797328322935E-6D, 9.823686253424796E-5D, -6.586024399045536E-4D, -7.528581489523087E-4D, 0.025854344242029606D, -0.11637092784486193D, 0.1826733677529661D, -3.67789363E-12D, 2.0876046746E-10D, -1.93319027226E-9D, -4.35953392472E-9D, 1.8006992266137E-7D, -7.8441223763969E-7D, -6.75407647949153E-6D, 8.428418334440096E-5D, -1.7604388937031816E-4D, -0.002397296114350716D, 0.02064129023876023D, -0.06905562880005864D, 0.09084526782065479D};
      double var4 = Math.abs(var0);
      double var6 = 0.0D;
      double var8 = 0.0D;
      boolean var10 = false;
      int var11;
      if (var4 < 2.2D) {
         var6 = var4 * var4;
         var11 = (int)var6;
         var6 -= (double)var11;
         var11 *= 13;
         var8 = ((((((((((((var2[var11] * var6 + var2[var11 + 1]) * var6 + var2[var11 + 2]) * var6 + var2[var11 + 3]) * var6 + var2[var11 + 4]) * var6 + var2[var11 + 5]) * var6 + var2[var11 + 6]) * var6 + var2[var11 + 7]) * var6 + var2[var11 + 8]) * var6 + var2[var11 + 9]) * var6 + var2[var11 + 10]) * var6 + var2[var11 + 11]) * var6 + var2[var11 + 12]) * var4;
      } else if (var4 < 6.9D) {
         var11 = (int)var4;
         var6 = var4 - (double)var11;
         var11 = 13 * (var11 - 2);
         var8 = (((((((((((var3[var11] * var6 + var3[var11 + 1]) * var6 + var3[var11 + 2]) * var6 + var3[var11 + 3]) * var6 + var3[var11 + 4]) * var6 + var3[var11 + 5]) * var6 + var3[var11 + 6]) * var6 + var3[var11 + 7]) * var6 + var3[var11 + 8]) * var6 + var3[var11 + 9]) * var6 + var3[var11 + 10]) * var6 + var3[var11 + 11]) * var6 + var3[var11 + 12];
         var8 *= var8;
         var8 *= var8;
         var8 *= var8;
         var8 = 1.0D - var8 * var8;
      } else {
         var8 = 1.0D;
      }

      return var8;
   }

   static Object a(double var0, int var2) {
      return var2 < 0 ? zst.f : b(var0, var2);
   }

   static double b(double var0, int var2) {
      boolean var3 = false;
      boolean var4 = false;
      double var11 = 0.0D;
      double[] var21 = new double[]{5.7568490574E10D, -1.3362590354E10D, 6.516196407E8D, -1.121442418E7D, 77392.33017D, -184.9052456D};
      double[] var22 = new double[]{5.7568490411E10D, 1.029532985E9D, 9494680.718D, 59272.64853D, 267.8532712D, 1.0D};
      double[] var23 = new double[]{7.2362614232E10D, -7.895059235E9D, 2.423968531E8D, -2972611.439D, 15704.4826D, -30.16036606D};
      double[] var24 = new double[]{1.44725228443E11D, 2.300535178E9D, 1.858330474E7D, 99447.43394D, 376.9991397D, 1.0D};
      double[] var25 = new double[]{1.0D, -0.001098628627D, 2.734510407E-5D, -2.073370639E-6D, 2.093887211E-7D};
      double[] var26 = new double[]{-0.01562499995D, 1.430488765E-4D, -6.911147651E-6D, 7.621095161E-7D, -9.34935152E-8D};
      double[] var27 = new double[]{1.0D, 0.00183105D, -3.516396496E-5D, 2.457520174E-6D, -2.40337019E-7D};
      double[] var28 = new double[]{0.04687499995D, -2.002690873E-4D, 8.449199096E-6D, -8.8228987E-7D, 1.05787412E-7D};
      double var5 = Math.abs(var0);
      if (var2 < 0) {
         var2 = -var2;
      }

      double var7;
      double var9;
      double var13;
      double var15;
      int var29;
      if (var2 != 1) {
         if (var5 < 8.0D) {
            var7 = var5 * var5;
            var11 = var21[5];
            var13 = var22[5];

            for(var29 = 4; var29 >= 0; --var29) {
               var11 = var11 * var7 + var21[var29];
               var13 = var13 * var7 + var22[var29];
            }

            var11 /= var13;
         } else {
            var9 = 8.0D / var5;
            var7 = var9 * var9;
            var11 = var25[4];
            var13 = var26[4];

            for(var29 = 3; var29 >= 0; --var29) {
               var11 = var11 * var7 + var25[var29];
               var13 = var13 * var7 + var26[var29];
            }

            var15 = var5 - 0.785398164D;
            var11 = var11 * Math.cos(var15) - var9 * var13 * Math.sin(var15);
            var11 *= Math.sqrt(0.636619772D / var5);
         }
      }

      if (var2 == 0) {
         return var11;
      } else {
         double var17 = var11;
         if (var5 < 8.0D) {
            var7 = var5 * var5;
            var11 = var23[5];
            var13 = var24[5];

            for(var29 = 4; var29 >= 0; --var29) {
               var11 = var11 * var7 + var23[var29];
               var13 = var13 * var7 + var24[var29];
            }

            var11 = var0 * var11 / var13;
         } else {
            var9 = 8.0D / var5;
            var7 = var9 * var9;
            var11 = var27[4];
            var13 = var28[4];

            for(var29 = 3; var29 >= 0; --var29) {
               var11 = var11 * var7 + var27[var29];
               var13 = var13 * var7 + var28[var29];
            }

            var15 = var5 - 2.356194491D;
            var11 = var11 * Math.cos(var15) - var9 * var13 * Math.sin(var15);
            var11 = var11 * var0 * Math.sqrt(0.636619772D / var5) / var5;
         }

         if (var2 == 1) {
            return var11;
         } else {
            double var19 = var11;
            if (var0 == 0.0D) {
               return 0.0D;
            } else {
               var15 = 2.0D / var5;
               if (var5 > 1.0D * (double)var2) {
                  if (var0 < 0.0D) {
                     var19 = -var11;
                  }

                  for(var29 = 1; var29 <= var2 - 1; ++var29) {
                     var11 = var15 * (double)var29 * var19 - var17;
                     var17 = var19;
                     var19 = var11;
                  }
               } else {
                  int var30 = (var2 + (int)Math.sqrt(40.0D * (double)var2)) / 2;
                  var30 = 2 * var30;
                  var11 = 0.0D;
                  var13 = 0.0D;
                  var17 = 1.0D;
                  var19 = 0.0D;

                  for(var29 = var30 - 1; var29 >= 0; --var29) {
                     var5 = var15 * (double)(var29 + 1) * var17 - var19;
                     var19 = var17;
                     var17 = var5;
                     if (Math.abs(var5) > 1.0E10D) {
                        var17 = var5 * 1.0E-10D;
                        var19 *= 1.0E-10D;
                        var11 *= 1.0E-10D;
                        var13 *= 1.0E-10D;
                     }

                     if ((var29 + 2) % 2 == 0) {
                        var13 += var17;
                     }

                     if (var29 + 1 == var2) {
                        var11 = var19;
                     }
                  }

                  var13 = 2.0D * var13 - var17;
                  var11 /= var13;
               }

               if (var0 < 0.0D && var2 % 2 == 1) {
                  var11 = -var11;
               }

               return var11;
            }
         }
      }
   }

   static Object c(double var0, int var2) {
      return var2 < 0 ? zst.f : d(var0, var2);
   }

   static double d(double var0, int var2) {
      double var8 = 0.0D;
      double[] var18 = new double[]{-2.957821389E9D, 7.062834065E9D, -5.123598036E8D, 1.087988129E7D, -86327.92757D, 228.4622733D};
      double[] var19 = new double[]{4.0076544269E10D, 7.452499648E8D, 7189466.438D, 47447.2647D, 226.1030244D, 1.0D};
      double[] var20 = new double[]{-4.900604943E12D, 1.27527439E12D, -5.153438139E10D, 7.349264551E8D, -4237922.726D, 8511.937935D};
      double[] var21 = new double[]{2.49958057E13D, 4.244419664E11D, 3.733650367E9D, 2.245904002E7D, 102042.605D, 354.9632885D, 1.0D};
      double[] var22 = new double[]{1.0D, -0.001098628627D, 2.734510407E-5D, -2.073370639E-6D, 2.093887211E-7D};
      double[] var23 = new double[]{-0.01562499995D, 1.430488765E-4D, -6.911147651E-6D, 7.621095161E-7D, -9.34935152E-8D};
      double[] var24 = new double[]{1.0D, 0.00183105D, -3.516396496E-5D, 2.457520174E-6D, -2.40337019E-7D};
      double[] var25 = new double[]{0.04687499995D, -2.002690873E-4D, 8.449199096E-6D, -8.8228987E-7D, 1.05787412E-7D};
      if (var2 < 0) {
         var2 = -var2;
      }

      if (var0 < 0.0D) {
         var0 = -var0;
      }

      if (var0 == 0.0D) {
         return -1.0E70D;
      } else {
         int var3;
         double var4;
         double var6;
         double var10;
         double var12;
         if (var2 != 1) {
            if (var0 < 8.0D) {
               var4 = var0 * var0;
               var8 = var18[5];
               var10 = var19[5];

               for(var3 = 4; var3 >= 0; --var3) {
                  var8 = var8 * var4 + var18[var3];
                  var10 = var10 * var4 + var19[var3];
               }

               var8 = var8 / var10 + 0.636619772D * (Double)a(var0, 0) * Math.log(var0);
            } else {
               var6 = 8.0D / var0;
               var4 = var6 * var6;
               var8 = var22[4];
               var10 = var23[4];

               for(var3 = 3; var3 >= 0; --var3) {
                  var8 = var8 * var4 + var22[var3];
                  var10 = var10 * var4 + var23[var3];
               }

               var12 = var0 - 0.785398164D;
               var8 = var8 * Math.sin(var12) + var6 * var10 * Math.cos(var12);
               var8 *= Math.sqrt(0.636619772D / var0);
            }
         }

         if (var2 == 0) {
            return var8;
         } else {
            double var14 = var8;
            if (var0 < 8.0D) {
               var4 = var0 * var0;
               var8 = var20[5];
               var10 = var21[6];

               for(var3 = 4; var3 >= 0; --var3) {
                  var8 = var8 * var4 + var20[var3];
                  var10 = var10 * var4 + var21[var3 + 1];
               }

               var10 = var10 * var4 + var21[0];
               var8 = var0 * var8 / var10 + 0.636619772D * ((Double)a(var0, 1) * Math.log(var0) - 1.0D / var0);
            } else {
               var6 = 8.0D / var0;
               var4 = var6 * var6;
               var8 = var24[4];
               var10 = var25[4];

               for(var3 = 3; var3 >= 0; --var3) {
                  var8 = var8 * var4 + var24[var3];
                  var10 = var10 * var4 + var25[var3];
               }

               var12 = var0 - 2.356194491D;
               var8 = var8 * Math.sin(var12) + var6 * var10 * Math.cos(var12);
               var8 *= Math.sqrt(0.636619772D / var0);
            }

            if (var2 == 1) {
               return var8;
            } else {
               double var16 = var8;
               var12 = 2.0D / var0;

               for(var3 = 1; var3 <= var2 - 1; ++var3) {
                  var8 = var12 * (double)var3 * var16 - var14;
                  var14 = var16;
                  var16 = var8;
               }

               return var8;
            }
         }
      }
   }

   static Object e(double var0, int var2) {
      return var2 < 0 ? zst.f : f(var0, var2);
   }

   static double f(double var0, int var2) {
      double var9 = 0.0D;
      double[] var17 = new double[]{1.0D, 3.5156229D, 3.0899424D, 1.2067492D, 0.2659732D, 0.0360768D, 0.0045813D};
      double[] var18 = new double[]{0.5D, 0.87890594D, 0.51498869D, 0.15084934D, 0.02658773D, 0.00301532D, 3.2411E-4D};
      double[] var19 = new double[]{0.39894228D, 0.01328592D, 0.00225319D, -0.00157565D, 0.00916281D, -0.02057706D, 0.02635537D, -0.01647633D, 0.00392377D};
      double[] var20 = new double[]{0.39894228D, -0.03988024D, -0.00362018D, 0.00163801D, -0.01031555D, 0.02282967D, -0.02895312D, 0.01787654D, -0.00420059D};
      if (var2 < 0) {
         var2 = -var2;
      }

      double var5 = Math.abs(var0);
      int var3;
      double var7;
      if (var2 != 1) {
         if (var5 < 3.75D) {
            var7 = var0 / 3.75D * (var0 / 3.75D);
            var9 = var17[6];

            for(var3 = 5; var3 >= 0; --var3) {
               var9 = var9 * var7 + var17[var3];
            }
         } else {
            var7 = 3.75D / var5;
            var9 = var19[8];

            for(var3 = 7; var3 >= 0; --var3) {
               var9 = var9 * var7 + var19[var3];
            }

            var9 = var9 * Math.exp(var5) / Math.sqrt(var5);
         }
      }

      if (var2 == 0) {
         return var9;
      } else {
         double var15 = var9;
         if (var5 < 3.75D) {
            var7 = var0 / 3.75D * (var0 / 3.75D);
            var9 = var18[6];

            for(var3 = 5; var3 >= 0; --var3) {
               var9 = var9 * var7 + var18[var3];
            }

            var9 *= var5;
         } else {
            var7 = 3.75D / var5;
            var9 = var20[8];

            for(var3 = 7; var3 >= 0; --var3) {
               var9 = var9 * var7 + var20[var3];
            }

            var9 = var9 * Math.exp(var5) / Math.sqrt(var5);
         }

         if (var0 < 0.0D) {
            var9 = -var9;
         }

         if (var2 == 1) {
            return var9;
         } else if (var0 == 0.0D) {
            return 0.0D;
         } else {
            var7 = 2.0D / var5;
            var5 = 0.0D;
            double var13 = 1.0D;
            double var11 = 0.0D;
            int var4 = var2 + (int)Math.sqrt(40.0D * (double)var2);
            var4 = 2 * var4;

            for(var3 = var4; var3 > 0; --var3) {
               var9 = var11 + (double)var3 * var7 * var13;
               var11 = var13;
               var13 = var9;
               if (Math.abs(var9) > 1.0E10D) {
                  var5 *= 1.0E-10D;
                  var11 *= 1.0E-10D;
                  var13 = var9 * 1.0E-10D;
               }

               if (var3 == var2) {
                  var5 = var11;
               }
            }

            var9 = var5 * var15 / var13;
            if (var0 < 0.0D && var2 % 2 == 1) {
               var9 = -var9;
            }

            return var9;
         }
      }
   }

   static Object g(double var0, int var2) {
      return var2 < 0 ? zst.f : h(var0, var2);
   }

   static double h(double var0, int var2) {
      double var6 = 0.0D;
      double[] var12 = new double[]{-0.57721566D, 0.4227842D, 0.23069756D, 0.0348859D, 0.00262698D, 1.075E-4D, 7.4E-6D};
      double[] var13 = new double[]{1.0D, 0.15443144D, -0.67278579D, -0.18156897D, -0.01919402D, -0.00110404D, -4.686E-5D};
      double[] var14 = new double[]{1.25331414D, -0.07832358D, 0.02189568D, -0.01062446D, 0.00587872D, -0.0025154D, 5.3208E-4D};
      double[] var15 = new double[]{1.25331414D, 0.23498619D, -0.0365562D, 0.01504268D, -0.00780353D, 0.00325614D, -6.8245E-4D};
      if (var2 < 0) {
         var2 = -var2;
      }

      if (var0 < 0.0D) {
         var0 = -var0;
      }

      if (var0 == 0.0D) {
         return 1.0E70D;
      } else {
         int var3;
         double var4;
         if (var2 != 1) {
            if (var0 <= 2.0D) {
               var4 = var0 * var0 / 4.0D;
               var6 = var12[6];

               for(var3 = 5; var3 >= 0; --var3) {
                  var6 = var6 * var4 + var12[var3];
               }

               var6 -= (Double)e(var0, 0) * Math.log(var0 / 2.0D);
            } else {
               var4 = 2.0D / var0;
               var6 = var14[6];

               for(var3 = 5; var3 >= 0; --var3) {
                  var6 = var6 * var4 + var14[var3];
               }

               var6 = var6 * Math.exp(-var0) / Math.sqrt(var0);
            }
         }

         if (var2 == 0) {
            return var6;
         } else {
            double var8 = var6;
            if (var0 <= 2.0D) {
               var4 = var0 * var0 / 4.0D;
               var6 = var13[6];

               for(var3 = 5; var3 >= 0; --var3) {
                  var6 = var6 * var4 + var13[var3];
               }

               var6 = var6 / var0 + (Double)e(var0, 1) * Math.log(var0 / 2.0D);
            } else {
               var4 = 2.0D / var0;
               var6 = var15[6];

               for(var3 = 5; var3 >= 0; --var3) {
                  var6 = var6 * var4 + var15[var3];
               }

               var6 = var6 * Math.exp(-var0) / Math.sqrt(var0);
            }

            if (var2 == 1) {
               return var6;
            } else {
               double var10 = var6;
               var4 = 2.0D / var0;

               for(var3 = 1; var3 < var2; ++var3) {
                  var6 = var8 + (double)var3 * var4 * var10;
                  var8 = var10;
                  var10 = var6;
               }

               return var6;
            }
         }
      }
   }

   static String a(String var0, int var1, int var2, int var3) {
      long var4 = 0L;
      if (var1 == 2) {
         if (var0.length() == 10 && var0.charAt(0) == '1') {
            var4 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 511L) + 1L;
         } else {
            var4 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else if (var1 == 8) {
         if (var0.length() == 10 && var0.charAt(0) == '7') {
            var4 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 134217727L) + 1L;
         } else {
            var4 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else if (var1 == 16) {
         if (var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F') {
            var4 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 68719476735L) + 1L;
         } else {
            var4 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else {
         var4 = com.aspose.cells.b.a.ze.a(var0, var1);
      }

      String var6 = com.aspose.cells.b.a.zv.a(com.aspose.cells.b.a.ze.a(var4, var2), var3, '0');
      return var6.length() > 10 ? var6.substring(var6.length() - 10, var6.length() - 10 + 10).toUpperCase() : var6.toUpperCase();
   }

   static String a(String var0, int var1, int var2) {
      long var3 = 0L;
      if (var1 == 2) {
         if (var0.length() == 10 && var0.charAt(0) == '1') {
            var3 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 511L) + 1L;
         } else {
            var3 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else if (var1 == 8) {
         if (var0.length() == 10 && var0.charAt(0) == '7') {
            var3 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 134217727L) + 1L;
         } else {
            var3 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else if (var1 == 16) {
         if (var0.length() == 10 && var0.toUpperCase().charAt(0) == 'F') {
            var3 -= (com.aspose.cells.b.a.ze.a(var0.substring(1, 10), var1) ^ 68719476735L) + 1L;
         } else {
            var3 = com.aspose.cells.b.a.ze.a(var0, var1);
         }
      } else {
         var3 = com.aspose.cells.b.a.ze.a(var0, var1);
      }

      String var5 = com.aspose.cells.b.a.ze.a(var3, var2);
      return var5.length() > 10 ? var5.substring(var5.length() - 10, var5.length() - 10 + 10).toUpperCase() : var5.toUpperCase();
   }
}
